<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>浮动-产品布局</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        li {
            list-style: none;
        }

        .product {
            margin: 50px auto;
            width: 1226px;
            height: 628px;
            background-color: #1f1ee1;
        }

        .left {
            float: left;
            width: 234px;
            height: 628px;
            background-color: #ee2211;
        }

        .right {
            float: right;
            width: 978px;
            height: 628px;
            background-color: #66ee88;
        }

        .right li {
            float: left;
            margin-right: 14px;
            margin-bottom: 15px;
            width: 234px;
            height: 300px;
            background-color: olivedrab;
        }

        /*第四个1i和第八个1i 去掉右侧的margin */
        .right li:nth-child(4n) {
            margin-right:0;
        }

        /*细节:如果父级宽度不够，浮动的盒子会掉下来*/
    </style>
</head>
<body>
    <!--版心:左右，右面:8个产品 → 8个li-->
    <div class="product">
        <div class="left"></div>
        <div class="right">
            <ul>
                <li></li>
                <li></li>
                <li></li>
                <li></li>
                <li></li>
                <li></li>
                <li></li>
                <li></li>
            </ul>
        </div>
    </div>
</body>
</html>